#ifndef VERSIONS_H
#define VERSIONS_H

#include <vector>
#include <string>

#include "version.h"

namespace qrcode{

class Versions
{
private:
    std::vector<Version> versionsL;
    std::vector<Version> versionsM;
    std::vector<Version> versionsQ;
    std::vector<Version> versionsH;

    std::vector<int> numRemainderBits;
    
    std::vector<int> characterCountIndicator_1_9;
    std::vector<int> characterCountIndicator_10_26;
    std::vector<int> characterCountIndicator_27_40;

    int GetMaxCapacity(std::string &model, char &level);

public:
    Versions();
    std::vector<Version> GetVersions(char level);
    bool IsWithinCapacity(int length, std::string &model, char &level);
    int GetCapacity(int version1, std::string &model1, char &level1);
    int GetMaxDataBits(int version, char level);
    std::vector<int> GetBreakInfo(int version, char level);
    std::vector<char> GetRemainderBits(int version);
    int GetGetRemainderBitsLength(int version);
    std::string GetCharacterCountIndicator(std::string &model, int version, int length);
    int GetCharacterCount(std::string &model, int version);
};

}

#endif // VERSIONS_H
